/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2025-04-08
 * Time: 19:59
 */
public class demo2 {

    private static int count = 0;

    public static void main(String[] args) {
        Object locker = new Object();

        for (int i = 0; i < 50000; i++) {
            synchronized(locker){
                synchronized(locker){
                    count++;
                }
            }
        }
    }
}
